<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>出库单管理</title>
	<meta name="decorator" content="ani"/>
	<style>
		#searchresult1
		{
			width: 260px;
			position: absolute;
			z-index: 1;
			overflow: hidden;
			left: 140px;
			top: 71px;
			background: #E0E0E0;
			border-top: none;

		}
		#searchresult
		{
			width: 260px;
			position: absolute;
			z-index: 1;
			overflow: hidden;
			left: 140px;
			top: 71px;
			background: #E0E0E0;
			border-top: none;

		}

		.line1
		{
			font-size: 15px;
			background: #E0E0E0;
			width: 140px;
			padding:0px;
		}
		.hover1
		{
			background: #007ab8;
			width: 140px;
			color: #fff;
		}

		.std1
		{
			width: 150px;
		}
		#searchresult2
		{
			width: 260px;
			position: absolute;
			z-index: 1;
			overflow: hidden;
			left: 140px;
			top: 71px;
			background: #E0E0E0;
			border-top: none;

		}

		.line2
		{
			font-size: 15px;
			background: #E0E0E0;
			width: 140px;
			padding:0px;
		}
		.hover2
		{
			background: #007ab8;
			width: 140px;
			color: #fff;
		}
		.std2
		{
			width: 150px;
		}
		#searchresult5
		{
			width: 260px;
			position: absolute;
			z-index: 1;
			overflow: hidden;
			left: 140px;
			top: 71px;
			background: #E0E0E0;
			border-top: none;

		}

		.line5
		{
			font-size: 15px;
			background: #E0E0E0;
			width: 140px;
			padding:0px;
		}
		#searchresult6
		{
			width: 260px;
			position: absolute;
			z-index: 1;
			overflow: hidden;
			left: 140px;
			top: 71px;
			background: #E0E0E0;
			border-top: none;

		}

		.line6
		{
			font-size: 15px;
			background: #E0E0E0;
			width: 140px;
			padding:0px;
		}
		.hover
		{
			background: #007ab8;
			width: 140px;
			color: #fff;
		}
	</style>
	<script type="text/javascript">
		var validateForm;
		var $table; // 父页面table表格id
		var $topIndex;//弹出窗口的 index
		function doSubmit(table, index){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $table = table;
			  $topIndex = index;
			  jp.loading();
			  $("#inputForm").submit();
			  return true;
		  }

		  return false;
		}

		$(document).ready(function() {
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					jp.post("${ctx}/wms/outbound/save1",$('#inputForm').serialize(),function(data){
						if(data.success){
	                    	$table.bootstrapTable('refresh');
	                    	jp.success(data.msg);
	                    	jp.close($topIndex);//关闭dialog

	                    }else{
            	  			jp.error(data.msg);
	                    }
					})
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
            $('#date').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#deliveryTime').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#actualDeliveryTime').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#arrivalTime').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
		});
		
		function addRow(list, idx, tpl, row){
			$(list).append(Mustache.render(tpl, {
				idx: idx, delBtn: true, row: row
			}));
			$(list+idx).find("select").each(function(){
				$(this).val($(this).attr("data-value"));
			});
			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
				var ss = $(this).attr("data-value").split(',');
				for (var i=0; i<ss.length; i++){
					if($(this).val() == ss[i]){
						$(this).attr("checked","checked");
					}
				}
			});
			$(list+idx).find(".form_datetime").each(function(){
				 $(this).datetimepicker({
					 format: "YYYY-MM-DD HH:00"
			    });
			});
		}
		function delRow(obj, prefix){
			var id = $(prefix+"_id");
			var delFlag = $(prefix+"_delFlag");
			if (id.val() == ""){
				$(obj).parent().parent().remove();
			}else if(delFlag.val() == "0"){
				delFlag.val("1");
				$(obj).html("&divide;").attr("title", "撤销删除");
				$(obj).parent().parent().addClass("error");
			}else if(delFlag.val() == "1"){
				delFlag.val("0");
				$(obj).html("&times;").attr("title", "删除");
				$(obj).parent().parent().removeClass("error");
			}
		}
        function tt(id,idx) {
            $.ajax({
                url:'${ctx}/infor/goods/getById?i='+id,
                success:function (data) {
                    $("#storehouseList"+idx+"_name0").val(data.id) ;
                    $("#storehouseList"+idx+"_code").val(data.code) ;
                    $("#storehouseList"+idx+"_packing").val(data.type.name) ;
                    $("#storehouseList"+idx+"_unit").val(data.packing) ;
                    $("#storehouseList"+idx+"_orderNumber").val("") ;
                }
            })

        }
        function tt1(id,idx) {
            $.ajax({
                url:'${ctx}/infor/goods/getById?i='+id,
                success:function (data) {
                    $("#storehouseList"+idx+"_name").val(data.name) ;
                    $("#storehouseList"+idx+"_name0").val(data.id) ;
                    $("#storehouseList"+idx+"_packing").val(data.type.name) ;
                    $("#storehouseList"+idx+"_unit").val(data.packing) ;
                    $("#storehouseList"+idx+"_orderNumber").val("") ;

                }


            })

        }
        function se0(evt,id,idx) {
            ChangeCoords1(id); //控制查询结果div坐标

            var k = window.event ? evt.keyCode : evt.which;
            //输入框的id为txt_search，这里监听输入框的keyup事件
            //不为空 && 不为上箭头或下箭头或回车
            if ($("#"+id).val() != "" &&k == 13) {
                $.ajax({
                    type: 'post',
                    async: true, //同步执行，不然会有问题
                    dataType: "json",
                    url: "${ctx}/infor/goods/getGoodsByName?name="+$("#"+id).val(),   //提交的页面/方法
                    error: function (msg) {//请求失败处理函数
                        alert("数据加载失败");
                    },
                    success: function (data) { //请求成功后处理函数。
						/*  var objData = eval("(" + data.userName + ")");   */
                        console.log(data);
                        if (data.length > 0) {
                            var layer = "";
                            layer = "<table id='aa'>";
                            $.each(data, function (idx, item) {
                                layer += "<tr class='line1' id='"+item.id+"'><td class='std1'>" + item.name+ "</td></tr>";
                            });
                            layer += "</table>";

                            //将结果添加到div中
                            $("#searchresult1").empty();
                            $("#searchresult1").append(layer);
                            $(".line1:first").addClass("hover");
                            $("#searchresult1").css("display", "");
                            //鼠标移动事件

                            $(".line1").hover(function () {
                                $(".line1").removeClass("hover");
                                $(this).addClass("hover");
                            }, function () {
                                $(this).removeClass("hover");
                                //$("#searchresult").css("display", "none");
                            });
                            //鼠标点击事件
                            $(".line1").click(function () {
                                $("#"+id).val($(this).text());
                                $("#"+id+"0").val($(this).attr("id"));
                                tt($(this).attr("id"),idx);
                                $("#searchresult1").css("display", "none");
                            });
                        } else {
                            $("#searchresult1").empty();
                            $("#searchresult1").css("display", "none");
                        }
                    }
                });
            }
            else if (k == 38) {//上箭头
                $('#aa tr.hover').prev().addClass("hover");
                $('#aa tr.hover').next().removeClass("hover");
                $("#"+id).val($('#aa tr.hover').text());
            }
            else if (k == 40) {//下箭头
                $('#aa tr.hover').next().addClass("hover");
                $('#aa tr.hover').prev().removeClass("hover");
                $("#"+id).val($('#aa tr.hover').text());
            }

            else {
                $("#searchresult1").empty();
                $("#searchresult1").css("display", "none");
            }
        }
        $("#searchresult1").bind("mouseleave", function () {
            $("#searchresult1").empty();
            $("#searchresult1").css("display", "none");
        });
        function se1(evt,id,idx) {
            ChangeCoords2(id); //控制查询结果div坐标

            var k = window.event ? evt.keyCode : evt.which;
            //输入框的id为txt_search，这里监听输入框的keyup事件
            //不为空 && 不为上箭头或下箭头或回车
            if ($("#"+id).val() != "" &&  k == 13) {
                $.ajax({
                    type: 'post',
                    async: true, //同步执行，不然会有问题
                    dataType: "json",
                    url: "${ctx}/infor/goods/getGoodsByCode?code="+$("#"+id).val(),   //提交的页面/方法
                    error: function (msg) {//请求失败处理函数
                        alert("数据加载失败");
                    },
                    success: function (data) { //请求成功后处理函数。
						/*  var objData = eval("(" + data.userName + ")");   */
                        console.log(data);
                        if (data.length > 0) {
                            var layer = "";
                            layer = "<table id='aa2'>";
                            $.each(data, function (idx, item) {
                                layer += "<tr class='line2' id='"+item.id+"'><td class='std2'>" + item.code+ "</td></tr>";
                            });
                            layer += "</table>";

                            //将结果添加到div中
                            $("#searchresult2").empty();
                            $("#searchresult2").append(layer);
                            $(".line1:first").addClass("hover");
                            $("#searchresult2").css("display", "");
                            //鼠标移动事件

                            $(".line2").hover(function () {
                                $(".line2").removeClass("hover");
                                $(this).addClass("hover");
                            }, function () {
                                $(this).removeClass("hover");
                                //$("#searchresult").css("display", "none");
                            });
                            //鼠标点击事件
                            $(".line2").click(function () {
                                $("#"+id).val($(this).text());
                                tt1($(this).attr("id"),idx);
                                $("#searchresult2").css("display", "none");
                            });
                        } else {
                            $("#searchresult2").empty();
                            $("#searchresult2").css("display", "none");
                        }
                    }
                });
            }
            else if (k == 38) {//上箭头
                $('#aa2 tr.hover').prev().addClass("hover");
                $('#aa2 tr.hover').next().removeClass("hover");
                $("#"+id).val($('#aa tr.hover').text());
            }
            else if (k == 40) {//下箭头
                $('#aa2 tr.hover').next().addClass("hover");
                $('#aa2 tr.hover').prev().removeClass("hover");
                $("#"+id).val($('#aa tr.hover').text());
            }

            else {
                $("#searchresult2").empty();
                $("#searchresult2").css("display", "none");
            }
        }
        $("#searchresult2").bind("mouseleave", function () {
            $("#searchresult2").empty();
            $("#searchresult2").css("display", "none");
        });
        function ChangeCoords2(id) {
            //    var left = $("#txt_search")[0].offsetLeft; //获取距离最左端的距离，像素，整型
            //    var top = $("#txt_search")[0].offsetTop + 26; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            var left = $("#"+id).position().left; //获取距离最左端的距离，像素，整型
            var top = $("#"+id).position().top + 30; ; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            $("#searchresult2").css("left", left + "px"); //重新定义CSS属性
            $("#searchresult2").css("top", top + "px"); //同上
        }
        function ChangeCoords1(id) {
            //    var left = $("#txt_search")[0].offsetLeft; //获取距离最左端的距离，像素，整型
            //    var top = $("#txt_search")[0].offsetTop + 26; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            var left = $("#"+id).position().left; //获取距离最左端的距离，像素，整型
            var top = $("#"+id).position().top + 30; ; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            $("#searchresult1").css("left", left + "px"); //重新定义CSS属性
            $("#searchresult1").css("top", top + "px"); //同上
        }

        function se(evt) {
            ChangeCoords(); //控制查询结果div坐标
            var k = window.event ? evt.keyCode : evt.which;
            //输入框的id为txt_search，这里监听输入框的keyup事件
            //不为空 && 不为上箭头或下箭头或回车
            if ($("#site").val() != "" && k == 13) {
                $.ajax({
                    type: 'post',
                    async: true, //同步执行，不然会有问题
                    dataType: "json",
                    url: "${ctx}/infor/lnCustomers/getLnCustomersByName?name="+$("#site").val()+"&pro=${fns:getUseroffice()}",   //提交的页面/方法
                    error: function (msg) {//请求失败处理函数
                        alert("数据加载失败");
                    },
                    success: function (data) { //请求成功后处理函数。
                        /*  var objData = eval("(" + data.userName + ")");   */
                        console.log(data);
                        if (data.length > 0) {
                            var layer = "";
                            layer = "<table id='aa'>";
                            $.each(data, function (idx, item) {
                                layer += "<tr class='line' id='"+item.id+"'><td class='std'>" + item.address+ "</td></tr>";
                            });
                            layer += "</table>";

                            //将结果添加到div中
                            $("#searchresult").empty();
                            $("#searchresult").append(layer);
                            $(".line:first").addClass("hover");
                            $("#searchresult").css("display", "");
                            //鼠标移动事件

                            $(".line").hover(function () {
                                $(".line").removeClass("hover");
                                $(this).addClass("hover");
                            }, function () {
                                $(this).removeClass("hover");
                                //$("#searchresult").css("display", "none");
                            });
                            //鼠标点击事件
                            $(".line").click(function () {
                                $("#site").val($(this).text());
                                tc($(this).attr("id"));
                                $("#searchresult").css("display", "none");
                            });
                        } else {
                            $("#searchresult").empty();
                            $("#searchresult").css("display", "none");
                        }
                    }
                });
            }
            else if (k == 38) {//上箭头
                $('#aa tr.hover').prev().addClass("hover");
                $('#aa tr.hover').next().removeClass("hover");
                $('#site').val($('#aa tr.hover').text());
            }
            else if (k == 40) {//下箭头
                $('#aa tr.hover').next().addClass("hover");
                $('#aa tr.hover').prev().removeClass("hover");
                $('#site').val($('#aa tr.hover').text());
            }

            else {
                $("#searchresult").empty();
                $("#searchresult").css("display", "none");
            }
        };
        $("#searchresult").bind("mouseleave", function () {
            $("#searchresult").empty();
            $("#searchresult").css("display", "none");
        });
        function tc(id) {
            url='${ctx}/infor/lnCustomers/det?i='+id
            $.ajax({
                url:url,
                success:function (data) {
                    $("#unitConfirmor").val(data.person);
                    $("#phone").val(data.phone);
                    $("#arriveProvince").val(data.province);
                    $("#arriveCity").val(data.city);
                    $("#distance").val(data.mileage);
                    $("#transitLines").val(data.line);
                    $("#unitName").val(data.lnCustomers.company);
                },
                error:function (data) {
                    alert("失败了");

                }
            })

        }
        function ChangeCoords() {
            //    var left = $("#txt_search")[0].offsetLeft; //获取距离最左端的距离，像素，整型
            //    var top = $("#txt_search")[0].offsetTop + 26; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            var left = $("#site").position().left; //获取距离最左端的距离，像素，整型
            var top = $("#site").position().top + 30; ; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            $("#searchresult").css("left", left + "px"); //重新定义CSS属性
            $("#searchresult").css("top", top + "px"); //同上
        }
        //物流商
        function se5(evt) {
            ChangeCoords5(); //控制查询结果div坐标
            var k = window.event ? evt.keyCode : evt.which;
            //输入框的id为txt_search，这里监听输入框的keyup事件
            //不为空 && 不为上箭头或下箭头或回车
            if ($("#logisticsName").val() != "" && k == 13) {
                $.ajax({
                    type: 'post',
                    async: true, //同步执行，不然会有问题
                    dataType: "json",
                    url: "${ctx}/infor/organization/getByName?name="+$("#logisticsName").val(),   //提交的页面/方法
                    error: function (msg) {//请求失败处理函数
                        alert("数据加载失败");
                    },
                    success: function (data) { //请求成功后处理函数。
						/*  var objData = eval("(" + data.userName + ")");   */
                        console.log(data);
                        if (data.length > 0) {
                            var layer = "";
                            layer = "<table id='aa5'>";
                            $.each(data, function (idx, item) {
                                layer += "<tr class='line5' name='"+item.phone+"' id='"+item.person+"'><td class='std'>" + item.name+ "</td></tr>";
                            });
                            layer += "</table>";

                            //将结果添加到div中
                            $("#searchresult5").empty();
                            $("#searchresult5").append(layer);
                            $(".line5:first").addClass("hover");
                            $("#searchresult5").css("display", "");
                            //鼠标移动事件

                            $(".line5").hover(function () {
                                $(".line5").removeClass("hover");
                                $(this).addClass("hover");
                            }, function () {
                                $(this).removeClass("hover");
                                //$("#searchresult").css("display", "none");
                            });
                            //鼠标点击事件
                            $(".line5").click(function () {
                                $("#logisticsName").val($(this).text());
                                $("#logisticsPerson").val(this.id);
                                $("#logisticsPhone").val($(this).attr("name"));
                                $("#searchresult5").css("display", "none");
                            });
                        } else {
                            $("#searchresult5").empty();
                            $("#searchresult5").css("display", "none");
                        }
                    }
                });
            }
            else if (k == 38) {//上箭头
                $('#aa5 tr.hover').prev().addClass("hover");
                $('#aa5 tr.hover').next().removeClass("hover");
                $('#logisticsName').val($('#aa5 tr.hover').text());
            }
            else if (k == 40) {//下箭头
                $('#aa5 tr.hover').next().addClass("hover");
                $('#aa5 tr.hover').prev().removeClass("hover");
                $('#logisticsName').val($('#aa5 tr.hover').text());
            }

            else {
                $("#searchresult5").empty();
                $("#searchresult5").css("display", "none");
            }
        };
        $("#searchresult5").bind("mouseleave", function () {
            $("#searchresult5").empty();
            $("#searchresult5").css("display", "none");
        });
        function ChangeCoords5() {
            //    var left = $("#txt_search")[0].offsetLeft; //获取距离最左端的距离，像素，整型
            //    var top = $("#txt_search")[0].offsetTop + 26; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            var left = $("#logisticsName").position().left; //获取距离最左端的距离，像素，整型
            var top = $("#logisticsName").position().top + 30; ; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            $("#searchresult5").css("left", left + "px"); //重新定义CSS属性
            $("#searchresult5").css("top", top + "px"); //同上
        }
//司机
        function se6(evt) {
            ChangeCoords6(); //控制查询结果div坐标
            var k = window.event ? evt.keyCode : evt.which;
            //输入框的id为txt_search，这里监听输入框的keyup事件
            //不为空 && 不为上箭头或下箭头或回车
            if ($("#driverName").val() != "" && k == 13) {
                $.ajax({
                    type: 'post',
                    async: true, //同步执行，不然会有问题
                    dataType: "json",
                    url: "${ctx}/infor/driver/getDriver?name="+$("#driverName").val(),   //提交的页面/方法
                    error: function (msg) {//请求失败处理函数
                        alert("数据加载失败");
                    },
                    success: function (data) { //请求成功后处理函数。
						/*  var objData = eval("(" + data.userName + ")");   */
                        console.log(data);
                        if (data.length > 0) {
                            var layer = "";
                            layer = "<table id='aa6'>";
                            $.each(data, function (idx, item) {
                                layer += "<tr class='line6'  id='"+item.phone+"'><td class='std'>" + item.name+ "</td></tr>";
                            });
                            layer += "</table>";

                            //将结果添加到div中
                            $("#searchresult6").empty();
                            $("#searchresult6").append(layer);
                            $(".line6:first").addClass("hover");
                            $("#searchresult6").css("display", "");
                            //鼠标移动事件

                            $(".line6").hover(function () {
                                $(".line6").removeClass("hover");
                                $(this).addClass("hover");
                            }, function () {
                                $(this).removeClass("hover");
                                //$("#searchresult").css("display", "none");
                            });
                            //鼠标点击事件
                            $(".line6").click(function () {
                                $("#driverName").val($(this).text());
                                $("#driverPhone").val(this.id);
                                $("#searchresult6").css("display", "none");
                            });
                        } else {
                            $("#searchresult6").empty();
                            $("#searchresult6").css("display", "none");
                        }
                    }
                });
            }
            else if (k == 38) {//上箭头
                $('#aa6 tr.hover').prev().addClass("hover");
                $('#aa6 tr.hover').next().removeClass("hover");
                $('#driverName').val($('#aa6 tr.hover').text());
            }
            else if (k == 40) {//下箭头
                $('#aa6 tr.hover').next().addClass("hover");
                $('#aa6 tr.hover').prev().removeClass("hover");
                $('#driverName').val($('#aa6 tr.hover').text());
            }

            else {
                $("#searchresult6").empty();
                $("#searchresult6").css("display", "none");
            }
        };
        $("#searchresult6").bind("mouseleave", function () {
            $("#searchresult6").empty();
            $("#searchresult6").css("display", "none");
        });
        function ChangeCoords6() {
            //    var left = $("#txt_search")[0].offsetLeft; //获取距离最左端的距离，像素，整型
            //    var top = $("#txt_search")[0].offsetTop + 26; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            var left = $("#driverName").position().left; //获取距离最左端的距离，像素，整型
            var top = $("#driverName").position().top + 30; ; //获取距离最顶端的距离，像素，整型（20为搜索输入框的高度）
            $("#searchresult6").css("left", left + "px"); //重新定义CSS属性
            $("#searchresult6").css("top", top + "px"); //同上
        }
        function addLn() {
            jp.openDialog('新增下游客户', "${ctx}/infor/lnCustomers/form1",'1200px', '800px', $('#carrierTable'));

        }
	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="outbound" action="${ctx}/wms/outbound/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
			<ul class="nav nav-tabs">
				<li class="active"><a data-toggle="tab" href="#tab-01" aria-expanded="true">订单详情</a>
				</li>
				<li class=""><a data-toggle="tab" href="#tab-02" aria-expanded="true">服务信息</a>
				</li>
				<li class=""><a data-toggle="tab" href="#tab-03" aria-expanded="true">收货信息</a>
				</li>
			</ul>
		<div class="tab-content">
			<div id="tab-01" class="tab-pane fade in  active">
				<table class="table table-bordered">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>出库单号：</label></td>
						<td class="width-35">
							<form:input path="code" htmlEscape="false"  readonly="true"  class="form-control required"/>
						</td>
						<td class="width-15 active"><label class="pull-right">状态：</label></td>
						<td class="width-35">
							<form:input path="status" htmlEscape="false" readonly="true"   class="form-control "/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">出库类型：</label></td>
						<td class="width-35">
							<form:input path="type" htmlEscape="false" readonly="true"   class="form-control "/>

						</td>
						<td class="width-15 active"><label class="pull-right">订单日期：</label></td>
						<td class="width-35">
							<%--<p class="input-group">--%>
							<%--<div class='input-group form_datetime' id='date'>--%>
								<input type='text' readonly="readonly"  name="date" class="form-control"  value="<fmt:formatDate value="${outbound.date}" pattern="yyyy-MM-dd HH:00"/>"/>
								<%--<span class="input-group-addon">--%>
			                        <%--<span class="glyphicon glyphicon-calendar"></span>--%>
			                    <%--</span>--%>
							<%--</div>--%>

						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">货主代码：</label></td>
						<td class="width-35">
							<form:input path="ownerCode" htmlEscape="false"  readonly="true"  class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">实际发货日期：</label></td>
						<td class="width-35">
							<input type='text'  name="actualDeliveryTime" readonly="readonly" class="form-control"  value="<fmt:formatDate value="${outbound.actualDeliveryTime}" pattern="yyyy-MM-dd HH:00"/>"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">要求发货日期：</label></td>
						<td class="width-35">
							<input type='text'  name="deliveryTime" readonly="readonly" class="form-control"  value="<fmt:formatDate value="${outbound.deliveryTime}" pattern="yyyy-MM-dd HH:00"/>"/>
						</td>
						<td class="width-15 active"><label class="pull-right">总订购量：</label></td>
						<td class="width-35">
							<form:input path="amount" htmlEscape="false"   readonly="true"  class="form-control "/>
						</td>
					</tr>

					<tr>
						<td class="width-15 active"><label class="pull-right">总毛重：</label></td>
						<td class="width-35">
							<form:input path="grossWeight" htmlEscape="false"   readonly="true"  class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">总体积：</label></td>
						<td class="width-35">
							<form:input path="volume" htmlEscape="false"    readonly="true" class="form-control "/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">项目名称：</label></td>
						<td class="width-35">
							<input name="projectName" <c:if test="${fns:getUseroffice()!='总部'}">readonly="readonly"</c:if> value="${outbound.projectName}" htmlEscape="false"    class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">到货日期：</label></td>
						<td class="width-35">
							<input type='text'  name="arrivalTime" readonly="readonly" class="form-control"  value="<fmt:formatDate value="${outbound.arrivalTime}" pattern="yyyy-MM-dd HH:00"/>"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">总净重：</label></td>
						<td class="width-35">
							<form:input path="netWeight" htmlEscape="false"  readonly="true"   class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">总金额：</label></td>
						<td class="width-35">
							<form:input path="money" htmlEscape="false"  readonly="true"   class="form-control "/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><span style="color: red">*</span>装运单号：</label></td>
						<td class="width-35">
							<form:input path="shipmentNumbers" htmlEscape="false"    class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">作业单号：</label></td>
						<td class="width-35">
							<form:input path="workNumber" htmlEscape="false"  readonly="true"  class="form-control "/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">箱数：</label></td>
						<td class="width-35">
							<form:input path="no" htmlEscape="false"  readonly="true"  class="form-control "/>
						</td>
						<td class="width-10 active"><label class="pull-right">作业类型：</label></td>
						<td class="width-23">
							<form:input path="workType" htmlEscape="false"  readonly="true"  class="form-control "/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">移动类型：</label></td>
						<td class="width-35">
							<form:input path="moveType" htmlEscape="false"  readonly="true"  class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">备注信息：</label></td>
						<td class="width-35">
							<form:input path="remarks" htmlEscape="false"  readonly="true"  class="form-control "/>
						</td>
					</tr></tbody></table>
				<div class="tabs-container">
					<ul class="nav nav-tabs">
							<%--<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">出库工作量统计：</a>--%>
							<%--</li>--%>
						<li class="active"><a data-toggle="tab" href="#tab-2" aria-expanded="false">出库物料明细：</a>
						</li>
					</ul>
					<div class="tab-content">

						<div id="tab-2" class="tab-pane fade in active">
							<table class="table table-striped table-bordered table-condensed">
								<thead>
								<tr>
									<th class="hide"></th>
									<th width="15%"><font color="red">*</font>提货单号</th>
									<th width="15%"><font color="red">*</font>物料编码</th>
									<th width="35%"><font color="red">*</font>物料名称</th>
									<th width="10%">物料类型</th>
									<th width="10%">单位</th>
									<th width="15%"><font color="red">*</font>订货数量</th>

								</tr>
								</thead>
								<tbody id="storehouseList">
								</tbody>
							</table>
							<script type="text/template" id="storehouseTpl">//<!--
				<tr id="storehouseList{{idx}}">
					<td class="hide">
						<input id="storehouseList{{idx}}_id" name="storehouseList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
						<input id="storehouseList{{idx}}_delFlag" name="storehouseList[{{idx}}].delFlag" type="hidden" value="0"/>
						<input id="storehouseList{{idx}}_idx" name="storehouseList[{{idx}}].idx" type="hidden" value="{{idx}}"/>

					</td>
<td>
						<input id="storehouseList{{idx}}_number" name="storehouseList[{{idx}}].number"  value="{{row.number}}" type="text"  class="form-control required "/>
</td>
                    <td>
                    <input id="storehouseList{{idx}}_code" name="storehouseList[{{idx}}].code" type="text" value="{{row.code}}" readonly="readonly" onkeyup="se1(event,this.id,'{{idx}}')"    class="form-control required "/>
					<div id="searchresult2" style="display: none;"></div>
					</td>
<td>
					<input id="storehouseList{{idx}}_name" name="storehouseList[{{idx}}].name.name" readonly="readonly" type="text" value="{{row.name.name}}" onkeyup="se0(event,this.id,'{{idx}}')"   class="form-control required" />
                    <input  id="storehouseList{{idx}}_name0" name="storehouseList[{{idx}}].name.id" type="hidden" value="{{row.name.id}}"    class="form-control " />

                    <div id="searchresult1" style="display: none;"></div>
					</td>

					<td>
						<input id="storehouseList{{idx}}_packing" readonly="readonly" name="storehouseList[{{idx}}].packing" type="text" value="{{row.packing}}"    class="form-control "/>
					</td>


					<td>
						<input id="storehouseList{{idx}}_unit" readonly="readonly" name="storehouseList[{{idx}}].unit" type="text" value="{{row.unit}}"    class="form-control "/>
					</td>

					<td>
						<input id="storehouseList{{idx}}_orderNumber" readonly="readonly" onblur="js(this.value,'{{idx}}')" name="storehouseList[{{idx}}].orderNumber" type="text" value="{{row.orderNumber}}"    class="form-control required "/>
					</td>




				</tr>//-->
							</script>
							<script type="text/javascript">
                                var storehouseRowIdx = 0, storehouseTpl = $("#storehouseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                                $(document).ready(function() {
                                    var data = ${fns:toJson(outbound.storehouseList)};
                                    for (var i=0; i<data.length; i++){
                                        addRow('#storehouseList', storehouseRowIdx, storehouseTpl, data[i]);
                                        storehouseRowIdx = storehouseRowIdx + 1;
                                    }
                                });
							</script>
						</div>
					</div>
				</div>
			</div>
			<div id="tab-02" class="tab-pane fade ">
				<table class="table table-bordered">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right">物流商名称：</label></td>
						<td class="width-35">
							<input id="logisticsName" name="logisticsName" onkeyup="se5(event)" autocomplete="off" htmlEscape="false" value="${outbound.logisticsName}"   class="form-control required"/>
							<div id="searchresult5" style="display: none;"></div>
						</td>
						<td class="width-15 active"><label class="pull-right">联系人：</label></td>
						<td class="width-35">
							<form:input path="logisticsPerson" htmlEscape="false"    class="form-control "/>
						</td>
					</tr>
					<tr>

						<td class="width-15 active"><label class="pull-right">联系人电话：</label></td>
						<td class="width-35">
							<form:input path="logisticsPhone" htmlEscape="false"    class="form-control "/>
						</td><td class="width-15 active"><label class="pull-right"><font color="red">*</font>车牌号码：</label></td>
						<td class="width-35">
							<input id="plateNumber" name="plateNumber"  htmlEscape="false" value="${outbound.plateNumber}"   class="form-control required"/>

						</td>

					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>司机姓名：</label></td>
						<td class="width-35">
							<input id="driverName" name="driverName" onkeyup="se6(event)" autocomplete="off" htmlEscape="false" value="${outbound.driverName}"   class="form-control required"/>
							<div id="searchresult6" style="display: none;"></div>

						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>司机电话：</label></td>
						<td class="width-35">
							<form:input path="driverPhone" htmlEscape="false"    class="form-control required"/>
						</td>

					</tr>

					<tr>
						<td class="width-15 active"><label class="pull-right">运输方式：</label></td>
						<td class="width-35">
							<form:input path="transportMode" htmlEscape="false"    class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">货主名称：</label></td>
						<td class="width-35">
							<form:input path="ownerName" htmlEscape="false"    class="form-control "/>
						</td>

					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">地址：</label></td>
						<td class="width-35">
							<form:input path="ownerAddress" htmlEscape="false"    class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">联系人：</label></td>
						<td class="width-35">
							<form:input path="ownerPerson" htmlEscape="false"    class="form-control "/>
						</td>

					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">电话：</label></td>
						<td class="width-35">
							<form:input path="ownerPhone" htmlEscape="false"    class="form-control "/>
						</td>
						<%--<td class="width-15 active"><label class="pull-right">物流订单号：</label></td>--%>
						<%--<td class="width-35">--%>
							<%--<form:input path="logisticsOrder" htmlEscape="false"    class="form-control "/>--%>
						<%--</td>--%>
						<td class="width-15 active"><label class="pull-right">货主系统名称：</label></td>
						<td class="width-35">
							<form:input path="ownerSystem" htmlEscape="false"    class="form-control "/>
						</td>
					</tr></tbody></table>
			</div>
			<div id="tab-03" class="tab-pane fade">
				<div style="height: 20px"> </div>
				<input type="button" class="btn-success" onclick="addLn()" value="增加下游客户"/>
				<div style="height: 20px"> </div>
				<table class="table table-bordered">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>收货详细地址：</label></td>
						<td class="width-35">
							<input id="site" name="site" onkeyup="se(event)" htmlEscape="false" value="${outbound.site}"   class="form-control required"/>
							<div id="searchresult" style="display: none;"></div>

						</td>
						<td class="width-15 active"><label class="pull-right">到站省：</label></td>
						<td class="width-35">
							<form:input path="arriveProvince" htmlEscape="false"    class="form-control "/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">到站市：</label></td>
						<td class="width-35">
							<form:input path="arriveCity" htmlEscape="false"    class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">收货单位名称：</label></td>
						<td class="width-35">
							<form:input path="unitName" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">收货单位确认人：</label></td>
						<td class="width-35">

							<form:input path="unitConfirmor" htmlEscape="false"    class="form-control required"/>
						</td>

						<td class="width-15 active"><label class="pull-right">确认人电话：</label></td>
						<td class="width-35">
							<form:input path="phone" htmlEscape="false"    class="form-control required"/>
						</td>



					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">合同里程：</label></td>
						<td class="width-35">
							<form:input path="distance" htmlEscape="false"    class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right">运输线路：</label></td>
						<td class="width-35">
							<form:input path="transitLines" htmlEscape="false"    class="form-control "/>
						</td>
					</tr>

					</tbody>
				</table>
			</div>
		</div>
		</form:form>
</body>
</html>